Repository navigation
HBASE-30452 Fix shaded testing util JAR test for clean test (addendum) - #8789
Conversation
|
So this just skip the test in nightly? I think we can merge this first to fix the build problem. But we'd better still find a way to make sure we do not bundle junit libraris in nightly tests. |
Yes, the check is skipped in the nightly clean test run. Once this is merged, I'll follow up by running TestShadedTestingUtilJarContents in the nightly shadedjars build, after the shaded JAR has been packaged, so nightly builds still check the actual JAR contents. |
|
Hi @Sigma-Ma, |
Thanks for letting me know. I'll prepare a branch-2 backport, resolve the conflicts, and verify both clean test and package before opening a PR. |
I've opened a branch-2 backport of #8789: #8805. #8802 runs TestShadedTestingUtilJarContents in shadedjars after packaging, alongside the existing invariant checks. Changes to the personality and JAR validation scripts also trigger this stage. |
What changes were proposed in this pull request?
Addendum to #8755 under HBASE-30452. Skip the JAR contents check when HBaseTestingUtil is loaded from a class directory. Keep all existing checks when it is loaded from a JAR.
Why are the changes needed?
During clean test, Maven loads HBaseTestingUtil from hbase-server/target/test-classes. Opening this directory with JarFile causes a FileNotFoundException. The previous local validation used package, which did not cover this case.
How was this patch tested?
mvn -s /Users/didi/.m2/settings-public.xml -B -ntp -pl hbase-shaded/hbase-shaded-testing-util-tester -am -Dtest=TestShadedTestingUtilJarContents,TestShadedHBaseTestingUtility -Dsurefire.firstPartGroups=org.apache.hadoop.hbase.testclassification.SmallTests,org.apache.hadoop.hbase.testclassification.MediumTests -Dsurefire.skipSecondPart=true -Dsurefire.rerunFailingTestsCount=0 clean test mvn -s /Users/didi/.m2/settings-public.xml -B -ntp -pl hbase-shaded/hbase-shaded-testing-util-tester -am -Dtest=TestShadedTestingUtilJarContents,TestShadedHBaseTestingUtility -Dsurefire.firstPartGroups=org.apache.hadoop.hbase.testclassification.SmallTests,org.apache.hadoop.hbase.testclassification.MediumTests -Dsurefire.skipSecondPart=true -Dsurefire.rerunFailingTestsCount=0 package